package com.study.行为型模式.责任链模式;

public class SchoolMasterApprover extends Approver{
    public SchoolMasterApprover(String name) {
        super(name);
    }

    @Override
    public void processRequest(PurchaseRequest purchaseRequest) {
        if (purchaseRequest.getPrice()>=30000){
            System.out.println("请求编号id="+purchaseRequest.getId()+"被"+this.name+"处理了");
        }else {
            //否则让下一个处理者去处理
            approver.processRequest(purchaseRequest);
        }
    }
}
